// make sure to import this
var webpack = require('webpack')

module.exports = {
  entry: './index.js',

  output: {
    filename: 'bundle.js',
		path: 'public',
    publicPath: ''
  },

  module: {
    loaders: [
      { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' }
    ]
  },
	plugins: process.env.NODE_ENV === 'production' ? [
	  new webpack.optimize.DedupePlugin(),
		new webpack.optimize.OccurrenceOrderPlugin(),
	  new webpack.optimize.UglifyJsPlugin()
	] : [],
}
